import fetch from "@/fetch";

// 验证码图形获取
export const codeImgGet = () => {
  return fetch({
    method: "get",
    url: "/code/getCaptcha",
    responseType: "blob",
    loading: true,
  });
};

// 用户登录
export const userLogin = (params) => {
  return fetch({
    method: "post",
    url: "/login",
    data: params,
    loading: true,
  });
};

// 忘记密码
export const forgetPassword = (params) => {
  return fetch({
    method: "post",
    url: "/forgetPassword",
    data: params,
    loading: true,
  });
};
// 忘记密码发送验证码
export const sendCode = (params) => {
  return fetch({
    method: "get",
    url: "/sms/sendCode",
    params,
  });
};
